import request from '@/utils/request'

// 查询志愿选择：学生先选，导师确认列表
export function listChoose(query) {
  return request({
    url: '/mentor/choose/list',
    method: 'get',
    params: query
  })
}

// 查询志愿选择：学生先选，导师确认详细
export function getChoose(id) {
  return request({
    url: '/mentor/choose/' + id,
    method: 'get'
  })
}

// 新增志愿选择：学生先选，导师确认
export function addChoose(data) {
  return request({
    url: '/mentor/choose',
    method: 'post',
    data: data
  })
}

// 修改志愿选择：学生先选，导师确认
export function updateChoose(data) {
  return request({
    url: '/mentor/choose',
    method: 'put',
    data: data
  })
}

// 删除志愿选择：学生先选，导师确认
export function delChoose(id) {
  return request({
    url: '/mentor/choose/' + id,
    method: 'delete'
  })
}

// 导出志愿选择：学生先选，导师确认
export function exportChoose(query) {
  return request({
    url: '/mentor/choose/exportAllStudent',
    method: 'get',
    params: query
  })
}

//获取学生选择导师的信息
export function getChooseByStuId(stuId) {
  return request({
    url: `/mentor/choose/insInfo/${stuId}`,
    method: 'get'
  })
}


// 根据导师id获取导师的学生列表
export function getMyStudent(query) {
  return request({
    url: '/mentor/choose/getStudentList',
    method: 'get',
    params: query
  })
}

//导师改变学生审核状态
export function insExamine(stuId,insId,subId,status) {
  return request({
    url: '/mentor/choose/insExamine',
    method: 'post',
    params: {stuId,insId,subId,status}
  })
}


//根据学生id获取选择状态
export function getChooseStatus(stuId){
  return request({
    url: '/mentor/choose/getChooseStatus',
    method: 'get',
    params: {stuId}
  })
}

